<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022/11/29
  Time: 20:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="bean.Apply" %>
<%@ page import="bean.ApplyBean" %>
<jsp:useBean id="applyBean" class="bean.ApplyBean" scope="application"/>
<style>
    #tom{
        font-family:宋体;font-size:20;
    }
</style>
<style>
    body {
        background: url(../image/sport.png) no-repeat center center fixed;
        /*兼容浏览器版本*/
        -webkit-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
</style>
<html>
<body id="tom">
<center>
    <h1>欢迎来到河南工业大学运动会管理系统！</h1>
    <table border="1">
        <tr>
            <th width="30">选手</th>
            <th width="80">项目编号</th>
            <th width="150">项目名称</th>
            <th width="50">结果</th>
            <th width="50">分数</th>
        </tr>
        <%
            applyBean=(ApplyBean) application.getAttribute("applyBean");
            applyBean.link();
            applyBean.getApplyArrayList().clear();
            applyBean.loadApply();
            String id=(String) session.getAttribute("ID");
            for(Apply i:applyBean.getApplyArrayList()){
                if(id.equals(i.getId())){
                    out.println("<tr class='test-c'>");
                    out.println("<td>"+i.getName()+"</td>");
                    out.println("<td>"+i.getId()+"</td>");
                    out.println("<td>"+i.getItemName()+"</td>");
                    out.println("<td>"+i.getResult()+"</td>");
                    out.println("<td>"+i.getGrade()+"</td>");
                    out.println("</tr>");
                }
            }
        %>
    </table>
    <form action="AwardServlet" method="post">
        颁奖:(输入获奖者姓名进行颁奖)<br>
        获奖者姓名:<input type="text" size="10" name="name"/><br>
        获奖项目:<input type="text" size="10" name="id"/><br><br>
        奖项:<input type="radio"  name="award" value="一等奖"/>一等奖
        <input type="radio"  name="award" value="二等奖"/>二等奖
        <input type="radio"  name="award" value="三等奖"/>三等奖<br>
        <br><input type="submit" name="submit" value="颁布">
    </form>
</center>
</body>
</html>
